#ifndef _HR_COMPANY_H_
#define _HR_COMPANY_H_

#include "rational.h"
#include "Employee.h"
#include "Company.h"
#include "AVLTree.h"
#include "library1.h"
#include "CompareEmployeesByID.h"
#include "CompareEmployeeBySalary.h"

namespace DataStructuresWet1
{
class HRCompany
{
public:
	//typedef AVLTree<Employee, int>::PreOrderIterator EmployeesIterator;
	//typedef AVLTree<Employee, int>::ConstPreOrderIterator ConstEmployeesIterator;
	HRCompany (int numOfCompanies);
	~HRCompany();
	StatusType Hire(int id, int company, Rational salary);
	StatusType Fire(int id, int company);
	StatusType GetEmployer(int id, int* company) const;
	StatusType GetSalary(int id, Rational *salary) const;
	StatusType MedianSalary(int id, int company, Rational *salary) const;
	StatusType HighestSalary(int id, int company, Rational *salary) const;
	StatusType UpdateSalaries(int company, Rational update);
	StatusType Merger(int buyingCompany, int sellingCompany);


protected:
	int numOfCompanies;
	CompareEmployeesByID cmpEmpByID;
	AVLTree<Employee> Employees;
	Company *Companies;
};
}
#endif //_HR_COMPANY_H_